"""eval函数的使用"""

# test = 0
#
# try:
#     a = eval(input("请输入a值："))
# except NameError:
#     test = test + 1
# else:
#     test = test - 1
# finally:
#     test = test + 1
# print(test)
#
# try:
#     a = eval(input('请输入b的值：'))
# except Exception:
#     print('出错了')


g = (a for a in range(8))
print(type(g))
print(next(g))
next(g)
print(next(g))

for i in range(0, 9):
    print(i, end='')
print('\n')
L = [2, 3, 4, 5, 6]
L1 = L[:]  # 创建了一个新的列表对象
print(L1 is L)  # is 比较的是地址值,结果为False代表这是两个不同的对象
print(L1 == L)  # 值为True，==比较的是内容是否相等

print('{:0>10}'.format(88))
print('{:0<10}'.format(88))

print('red hat'.capitalize())  # Red hat

print(ord('我'))

print('=============')
temp = 'python is so easy'
upper_temp = temp.upper()  # 返回新字符串，原字符串不变
print(temp)
print(upper_temp)


print('a' + 3 == 'c')
